﻿using MainView.MyControl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MainView.Model
{   
    public class RoomState
    {
        #region 属性
        private int _iD = 0x01;
        private string _addr = "192.168.100.123";
        private string _name = "1-3";
        private string _com = "COM1";    


        private DevCommon _devCommon;
        
        
        public static Dictionary<int, RoomState> RoomStateDic = new Dictionary<int, RoomState>();

        public int ID { get => _iD; set => _iD = value; }
        public string Addr { get => _addr; set => _addr = value; }
        public string Name { get => _name; set => _name = value; }
     
        public string Com { get => _com; set => _com = value; }
        public DevCommon devCommon { get => _devCommon; set => _devCommon = value; }
        

        #endregion
        public RoomState(int id,string addr, string name)
        {
            ID = id;          
            Addr = addr;
            Name = name;
            //if(ID==2) devZyt = new DevZyt(this);
            //else devCommon = new DevCommon(this);
            //
            devCommon = new DevCommon(this);
        }
       
    }
}
